﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Mvc;

namespace WebUI.HtmlHelpers
{
    public static class ListTextHelper
    {
        public static MvcHtmlString ListText(this HtmlHelper helper, IEnumerable<string> lstText)
        {
            var ul = new TagBuilder("ul");
            foreach (var item in lstText)
            {
                var li = new TagBuilder("li");
                li.InnerHtml = item;

                ul.InnerHtml += li.ToString();
            }

            return MvcHtmlString.Create(ul.ToString());
        }
    }
}